package com.ebring.shareEducation.controller;

import com.ebring.shareEducation.bean.Questions;
import com.ebring.shareEducation.bean.Talent;
import com.ebring.shareEducation.service.QuestionsService;
import com.ebring.shareEducation.utils.RspMsg;
import com.github.pagehelper.PageHelper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(value = "客诉管理" ,tags = {"客诉管理"})
@CrossOrigin(origins = "http://wangliang.vipgz1.idcfengye.com", maxAge = 3600)
public class QuestionController {

    @Autowired
    private QuestionsService questionsService;




    /**
     * 新增加的客诉
     *
     * @return
     */
    @PostMapping("/Questions/insertquestion")
    @ApiOperation(value="新增加的客诉", notes="新增加的客诉")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query",name = "type", value = "客诉类型", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query",name = "title", value = "客诉标题", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query",name = "author", value = "客诉作者", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query",name = "language", value = "语言", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query",name = "file", value = "上传文件地址", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query",name = "content", value = "客诉内容", required = true, dataType = "String"),




    })
    public RspMsg<Questions> insertquestion(String type,String title,String author,String language,String file,String content) {
        return questionsService.insertquestion(type,title,author,language,file,content);
    }

}
